package com.pm.mapper.dept;

import com.pm.entity.dto.dept.DeptTypeScoreDto;
import com.pm.entity.po.dept.DepartmentScore;
import com.pm.entity.po.dept.EvaluateTaskPo;
import com.pm.entity.vo.ScoreSummaryVo;
import com.pm.entity.vo.dept.DepartmentScoreVo;
import com.pm.entity.vo.dept.DeptQuarterScoreVo;
import com.pm.entity.vo.dept.DeptTaskNumVo;
import com.pm.entity.vo.dept.DeptTypeTaskScoreVo;
import com.pm.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DepartmentScoreMapper extends BaseMapper<DepartmentScore> {
    List<DepartmentScoreVo> getListDepartmentSocre(DepartmentScore departmentScore);

    Integer update1(DepartmentScore departmentScore);

    Integer update2(DepartmentScore departmentScore);

    void addAll(DepartmentScore departmentScore);

    void removeNew(Integer id);

    List<ScoreSummaryVo> getScoreSummary(Integer type);

    List<ScoreSummaryVo> getScoreSummaryTask(ScoreSummaryVo scoreSummaryVo);

    Integer removeDepartmentScore(DepartmentScore departmentScore);

    /**
     * 根据部门id，年，季度查询各任务的分数
     * @param deptTaskNumVo
     * @return
     */
    List<EvaluateTaskPo> getScoreByDeptId(DeptTaskNumVo deptTaskNumVo);

    /**
     * 根据任务id和部门id，查询全年每个季度的得分
     * @param taskId
     * @param deptId
     * @return
     */
    DeptQuarterScoreVo getQuarterScoreByDeptId(@Param("taskId") Integer taskId, @Param("deptId") Integer deptId);

    /**
     * 根据部门类型和重点工作id查询各部门得分
     * @param deptTypeTaskScoreVo
     * @return
     */
    List<DeptTypeScoreDto> getScoreByDeptTypeAndTaskId(DeptTypeTaskScoreVo deptTypeTaskScoreVo);
}